import request from '@/utils/request'

// 房间信息
export function getRoom(data) {
  return request({
    url: '/room/getPage',
    method: 'post',
    data: data
  })
}
// 更新房间信息
export function updateRoom(data) {
  return request({
    url: '/room/update',
    method: 'post',
    data: data
  })
}

// 删除房间
export function deleteRoom(id) {
  return request({
    url: `/room/delete/${id}`,
    method: 'get',
    headers: {
      'Content-Type':'application/x-www-form-urlencoded'
    }
  })
}
// 添加房间
export function addRoom(data) {
  return request({
    url: '/room/save',
    method: 'post',
    data: data
  })
}

// 获取当前用户的住址
export function getUserInformation(username) {
  return request({
    url: `/vue-admin-template/user/getUserInfo/${username}`,
    method: 'post',
    headers: {
      'Content-Type':'application/x-www-form-urlencoded'
    }
  })
}
